<include file="Public/header" /> 

<!--主窗体-->
<div class="container app">
	<!--左侧菜单-->
	<include file="Public/sidebar" /> 
	<!--左侧菜单//-->
	
	<!-- mainCon -->
	<div id="mainCon" class="mainCon">
		<h4>收款神器申请</h4>
		<div>
			<form class="form-inline" >
				<div class="form-group form-group-sm">
					<label for="mobile">手机号码：</label>
					<input type="text" class="form-control" id="mobile" name="mobile" placeholder="手机号码" value="<{$mobile}>">
				</div>
				<div class="form-group form-group-sm">
					<label for="name">会员名：</label>
					<input type="text" class="form-control" id="name" name="name" placeholder="会员名" value="<{$name}>" >
				</div>
				<div class="form-group form-group-sm">
					<label for="identity">身份证号码：</label>
					<input type="text" class="form-control" id="identity" name="identity" placeholder="身份证号码" value="<{$identity}>" >
				</div>
				<div class="bk10"></div>
				<div class="form-group form-group-sm">
					<label>审核状态：</label>
					<div class="checkbox">
						<label class="checkbox-inline">
							<input type="checkbox" id="stateWaitCheck" <if condition='$stateWait'>checked=checked</if> >
							<input type="hidden" name="stateWait" id="stateWait" value="<{$stateWait}>">
							<span style="color:#FFA530">待审核</span>
						</label>
						<label class="checkbox-inline">
							<input type="checkbox" id="statePassCheck" <if condition='$statePass'>checked=checked</if> >
							<input type="hidden" name="statePass" id="statePass" value="<{$statePass}>">
							<font color="green">已通过</font>
						</label>
						<label class="checkbox-inline">
							<input type="checkbox" id="stateVetoCheck" <if condition='$stateVeto'>checked=checked</if> >
							<input type="hidden" name="stateVeto" id="stateVeto" value="<{$stateVeto}>">
							<font color="red">被否决</font>
						</label>
					</div>
				</div>
				<button type="submit" class="btn btn-default btn-sm col-md-offset-1"><b>查询会员</b></button>
			</form>
		</div>
		<div class="bk10"></div>
		<table class="table table-bordered table-hover">
			<tr>
				<th>编号</th>
				<th>会员名</th>
				<th>身份证号</th>
				<th>手机号码</th>
				<th>地址</th>
				<th>时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>

			<empty name="pos_list">
				<tr><td colspan="8" style="text-align:center;color:#999">～暂无数据～</td></tr>
			<else /> 
				<foreach name="pos_list" item="vo">
					<tr>
						<td><{$vo['id']}></td>
						<td><{$vo['name']}></td>
						<td><{$vo['identity']}></td>
						<td>
							<{$vo['mobile']}>
						</td>
						<td>
							<{$vo['address']}>
						</td>
						<td><{$vo['createtime']|date="Y-m-d H:i",###}></td>
						<td>
							<if condition="$vo['status'] eq 0">
								<span style="color:#FFA530">待审核</span>
							<elseif condition="$vo['status'] eq 1"/>
								<span style="color:green">已通过</span>
							<elseif condition="$vo['status'] eq -1"/>
								<span style="color:red">未通过</span>
							</if>
						</td>
						<td>
							<a href="<{:U('User/pos_info',array('id'=>$vo['id'],'k'=>2,'sk'=>2))}>">查看</a>
						</td>
					</tr>
				</foreach>
			
			</empty>
			
		</table>
		
		<div class="pagebar">
			<{$pager}>
		</div>
		
	</div>
	<!-- mainCon// -->
	
</div>
<!--主窗体//-->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
$(function(){

	$('#stateWaitCheck').click(function() {
		if ($(this).prop('checked')) {
			$('#stateWait').val('1');
		} else {
			$('#stateWait').val('0');
		}
	});
	$('#statePassCheck').click(function() {
		if ($(this).prop('checked')) {
			$('#statePass').val('1');
		} else {
			$('#statePass').val('0');
		}
	});
	$('#stateVetoCheck').click(function() {
		if ($(this).prop('checked')) {
			$('#stateVeto').val('1');
		} else {
			$('#stateVeto').val('0');
		}
	});

	$(".delAct").click(function(){
		var that = this;
		layer.confirm('您是否确认删作废记录？作废后不可恢复！', {icon: 3, title:'提示'}, function(index){
			var itemid = $(that).attr("data-id");
			$.post("<{:U('Withdrawal/withdrawal_Invalid')}>",{id:itemid},function(r){
				if(r.error == 1){
					layer.close(index);
					layer.alert(r.errmsg,{icon: 2});
				}else{
					window.location.reload();
				}
			});
		});
		return false;
	});
});
</script>

<include file="Public/footer" /> 